package com.sixth.stock.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sixth.core.entity.Purchase;
import com.sixth.core.entity.PurchaseItem;
import com.sixth.core.vo.R;
import com.sixth.stock.vo.PurchaseDto;
import com.sixth.stock.vo.PurchaseVo;

import java.util.List;
import java.util.Map;

/**
* @author Administrator
* @description 针对表【stock_purchase】的数据库操作Service
* @createDate 2024-08-14 19:56:44
*/
public interface PurchaseService extends IService<Purchase> {
    R<IPage<Purchase>> selectByPage(PurchaseVo purchaseVo);

    R<IPage<Purchase>> listByStatus(PurchaseVo purchaseVo);

    R submit(String purchaseId);

    R doInvalid(String purchaseId);

    R doInventory(String purchaseId);

    R auditPass(String purchaseId);

    R auditNoPass(String purchaseId, String reason);

    R<List<PurchaseItem>> getPurchaseItemById(String purchaseId);

    R<String> generatePurchaseId();

    R erpAddPurchase(List<PurchaseItem> PurchaseItem);

    R addPurchaseToAudit(List<PurchaseItem> purchaseItems);

    R<List<PurchaseItem>> queryPurchaseAndItemByPurchaseId(String purchaseId);

    R updateByPurchaseId(PurchaseDto purchaseDto);

    R updateStatusByPurchaseId(PurchaseDto purchaseDto);

    R<Map<String, Object>> queryPurchaseAndItemByPurchaseId2(String purchaseId);
}